Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const chalk = require('chalk'); |
||
11 | function speak(message, type = 'console', color = 'cyan') { |
||
12 | if (type === 'console') { |
||
13 | console.log(chalk[color](message)); //eslint-disable-line |
||
14 | } else { |
||
15 | console.log( //eslint-disable-line |
||
16 | chalk[color]( |
||
17 | figlet.textSync(message, { horizontalLayout: 'full' }) |
||
18 | )); |
||
19 | } |
||
20 | return { type, message, color }; |
||
21 | } |
||
22 | |||
24 |